import {request,requestMock} from '@/utils/http'

export const requestCategoryList = ()=>{
  return request.get('/api/product/getBaseCategoryList')
}

//请求banner数据
export const requestBannerList = ()=>{
  return requestMock.get("/banner")
}

//请求floor数据
export const requestFloorList = ()=>{
  return requestMock.get("/floor")
}

//请求search数据
export const requestSearchList =(params)=>{
  return request.post('/api/list',params)
}

//请求详情页数据
export const requestDetailList =(params)=>{
  return request.get(`/api/item/${params}`)
}

//点击加入购物车发送数据
export const requestAddToCart =({skuId,skuNum})=>{
  return request.post(`/api/cart/addToCart/${ skuId }/${ skuNum }`)
}

//加载购物车列表数据
export const requestShopCartList = ()=>{
  return request.get('/api/cart/cartList')
}
